export default {
    required: (message = '必填项') => ({
      required: true,
      message,
      trigger: 'blur'
    }),
    email: () => ({
      type: 'email',
      message: '邮箱格式不正确',
      trigger: ['blur', 'change']
    }),
    password: () => ({
      validator: (_, v) => /^(?=.*[a-z])(?=.*[A-Z]).{6,}$/.test(v),
      message: '需包含大小写字母且至少6位',
      trigger: 'blur'
    }),
    phone: () => ({
      pattern: /^1[3-9]\d{9}$/,
      message: '手机号格式不正确',
      trigger: 'blur'
    })
  }